package com.demo.bookstore.vo;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author ddone
 * @date 2024/3/15-15:01
 * 返回给前端的对象数据
 * 后期封装成对象 统一格式返回给前端
 */
@Data
@AllArgsConstructor
public class SysResult {
    private boolean flag;
    private String msg;
    private Object data;
    public static SysResult success(Object data){
        return new SysResult(true,"业务调用成功",data);
    }
    public static SysResult fail(Object data){
        return new SysResult(false,"业务调用失败",null);
    }
}

